first = input()
second = input()
third = input()

if 'vertebrado' == first:
    if 'ave' == second:
        if 'carnivoro' == third:
            print('aguia')
        elif 'onivoro' == third:
            print('pomba')
    elif 'mamifero' == second:
        if 'onivoro' == third:
            print('homem')
        elif 'herbivoro' == third:
            print('vaca')
elif 'invertebrado' == first:
    if 'inseto' == second:
        if 'hematofago' == third:
            print('pulga')
        elif 'herbivoro' == third:
            print('lagarta')
    elif 'anelideo' == second:
        if 'hematofago' == third:
            print('sanguessuga')
        elif 'onivoro' == third:
            print('minhoca')
